package com.jspgou.cms.dao;

import java.util.Date;
import java.util.List;

import com.jspgou.common.hibernate3.Updater;
import com.jspgou.common.page.Pagination;
import com.jspgou.cms.entity.Discuss;

public interface DiscussDao {
	public Discuss findById(Long id);

	public Discuss saveOrUpdate(Discuss bean);
	
	public List<Discuss> getList(Long orderItemId);

	public List<Discuss> getList(Long memberId,Long productId);

	public Discuss deleteById(Long id);
	
	public Discuss updateByUpdater(Updater<Discuss> updater);
	
	public Pagination getPageByProduct(Long productId,String userName,String productName,
			Date startTime,Date endTime,int pageNo,int pageSize,boolean cache);
	
	//添加参数discussType ,按照评价类型查询数据
	public Pagination getPage(Long memberId,Long productId,Long storeId,String discussType,int pageNo,int pageSize,boolean start);
	//添加方法，根据discussType获取指定商品评价数据
	public List<Discuss> findByType(Long productId,String discussType);
	//添加方法，按照discussType删除数据
	public List<Discuss> deleteByType(String discussType);

}